package com.itheima;

import java.text.ParseException;
import java.text.SimpleDateFormat;

public class Demo01 {
    public static void main(String[] args) throws ParseException {


        String start = "2020-11-11 0:0:0";
        String end = "2020-11-11 0:10:0";


        String jia = "2020-11-11 0:03:0";
        String pi = "2020-11-11 0:10:10";

        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        long startTime = sdf.parse(start).getTime();
        long endTime = sdf.parse(end).getTime();

        long jiaTime = sdf.parse(jia).getTime();
        long piTime = sdf.parse(pi).getTime();

        if (jiaTime>startTime&&jiaTime<endTime){
            System.out.println("小贾参加了");
        }else {
            System.out.println("遗憾了");
        }
        if (piTime>startTime&&piTime<endTime){
            System.out.println("小皮参加了");
        }else {
            System.out.println("小皮遗憾了");
        }
    }
}
